Skip to content

[tests] fix torchao tests#13330

Open
sayakpaul wants to merge 5 commits intomainfrom
fix-torchao-tests
Open

[tests] fix torchao tests#13330
sayakpaul wants to merge 5 commits intomainfrom
fix-torchao-tests

Conversation

@sayakpaul
Copy link
Copy Markdown
Member

What does this PR do?

Surfaced in #13291 (comment). Cc: @howardzhang-cv

@sayakpaul sayakpaul requested a review from DN6 March 25, 2026 04:09
model_quantized.to(torch_device)

inputs = self.get_dummy_inputs()
model_dtype = next(model_quantized.parameters()).dtype
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would affect all quantization backends? e.g. With a GGUF backend the dtype could end up as int8 and potentially cast inputs into int8?

Also prefer to avoid casting inputs post fetching from self.get_dummy_inputs() within a test if we can avoid it.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where should it go then? Should we implement a custom get_dummy_inputs() for torchao tests? I think it's reasonably safe to keep the dtypes of the inputs to bfloat16 there because that will replicate what we do in actual pipelines. LMK.

@github-actions github-actions Bot added tests CI size/S PR with diff < 50 LOC labels Apr 16, 2026
@sayakpaul sayakpaul mentioned this pull request Apr 16, 2026
6 tasks
@github-actions github-actions Bot added size/S PR with diff < 50 LOC and removed size/S PR with diff < 50 LOC labels May 1, 2026
@sayakpaul
Copy link
Copy Markdown
Member Author

@DN6 I have adjusted the PR to match #13481. LMK.

@github-actions github-actions Bot added size/S PR with diff < 50 LOC and removed size/S PR with diff < 50 LOC labels May 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI size/S PR with diff < 50 LOC tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants